using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ECommerce.Library;
using AutoGear.BLL;

public partial class admin_add_subscribergroup : SiteAdminBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Create_Click(object sende,EventArgs e)
    {
        if (IsValid)
        {
            try
            {
                string name = Security.BindStringInput(tbxGroupName.Text, SecurityLevel.Zero);

                NewsletterGroup newGroup = new NewsletterGroup(0, name, true);
                newGroup.Update();
                uccResponseMessage.SetSuccessMessage("Group successfuly created");
            }
            catch (Exception ex)
            {
                uccResponseMessage.SetSuccessMessage("Failed to create group");
            }
        }
    }
}
